package LocatorsOnPages;

import Tests.TestConditions;
import org.openqa.selenium.By;
import org.openqa.selenium.WebDriver;
import org.openqa.selenium.support.PageFactory;

import java.util.concurrent.TimeUnit;

public class HomePage extends TestConditions {



    /*---------------constructor---------------------------------------------------------------*/
    public HomePage (WebDriver driver)
    {
        this.driver = driver;

    }

    /*---------------locators---------------------------------------------------------------*/

    private By ComputersNotebooks = By.id("computers-notebooks");
    private By PhonesMp3Gps = By.id("phones-mp3-gps");
    private By TvPhotoVideo = By.id("tv-photo-video");
    private By HouseHold = By.id("bt");
    private By ActiveMenu = By.id("outdoorsman");
    private By Kids = By.id("kids");
    private By HouseGarden = By.id("house_garden");
    private By AutoMenu = By.id("273290");
    private By ScheduleMenu = By.id("fatmenu_14");
    private By Shoes = By.id("shoes");


    /*---------------end locators---------------------------------------------------------------*/


    /*---------------Actions---------------------------------------------------------------*/

    public void homeUrl(){

        driver.get("http://rozetka.com.ua");

    }


    public void wait(int seconds){

        driver.manage().timeouts().implicitlyWait(seconds, TimeUnit.SECONDS);

    }

    public void ClickComputersMenu(){

        driver.findElement(ComputersNotebooks).click();

    }


    public void ClickPhonesMenu(){

        driver.findElement(PhonesMp3Gps).click();

    }


    public void ClickTvAudioMenu(){

        driver.findElement(TvPhotoVideo).click();

    }


    public void ClickHouseholdMenu(){

        driver.findElement(HouseHold).click();

    }


    public void ClickActiveMenu(){

        driver.findElement(ActiveMenu).click();

    }


    public void ClickSmartGamesMenu(){

        driver.findElement(Kids).click();

    }


    public void ClickHouseGardenMenu(){

        driver.findElement(HouseGarden).click();

    }


    public void ClickAutoMenu(){

        driver.findElement(AutoMenu).click();

    }


    public void ClickScheduleMenu(){

        driver.findElement(ScheduleMenu).click();

    }


    public void ClickBootsMenu(){

        driver.findElement(Shoes).click();

    }

     /*---------------End Actions---------------------------------------------------------------*/
}
